﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GameLib.Utils
{
	public static class MathEx
	{
		public static int Clamp(int value, int min, int max)
		{
			return Math.Max(min, Math.Min(value, max));
		}

		public static double Clamp(double value, double min, double max)
		{
			return Math.Max(min, Math.Min(value, max));
		}

		public static float Clamp(float value, float min, float max)
		{
			return Math.Max(min, Math.Min(value, max));
		}
	}
}
